package com.yizhubao.app.utils.net;



import com.yizhubao.app.base.BaseResultBean;
import com.yizhubao.app.beans.ConfigBean;
import com.yizhubao.app.beans.ListRecordBean;
import com.yizhubao.app.beans.RecordBean;
import com.yizhubao.app.beans.RecordDetailBean;
import com.yizhubao.app.beans.WXLoginBean;
import com.yizhubao.app.utils.Constants;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PartMap;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;

/**
 * @author PACY
 * 创建时间 19/1/9 14:29.
 * 邮箱 pengwwe457621023@qq.com
 * 类描述 接口地址
 */
public interface ApiService {
    /**
     * 首页列表
     *
     */
    @POST("record/listRecord")
    Observable<BaseResultBean<ListRecordBean>> sendRecordRequest(@Body Map<String, Object> map);
    /**
     * 身份认证
     *
     */
    @POST("user/iDCardValid")
    Observable<BaseResultBean<WXLoginBean>> IdCardValidRequest(@Body Map<String, Object> map);


    /**
     * 新增或更新记录
     *
     */
    @POST("record/updateRecord")
    Observable<BaseResultBean<Integer>> saveRecordRequest(@Body Map<String, Object> map);

    /**
     * 公益通道
     *
     */
    @POST("specialIdentity/addSpecialIdentity")
    Observable<BaseResultBean> welfareRequest(@Body Map<String, Object> map);


    /**
     * 获取记录详情
     *
     */
    @GET("record/getRecordDetail")
    Observable<BaseResultBean<RecordDetailBean>> getRecordDetail(@QueryMap Map<String, Object> map);
    /**
     * 微信登录
     *
     */
    @GET("record/deleteRecord")
    Observable<BaseResultBean> deleteRecord(@QueryMap Map<String, Object> map);



    /**
     * 微信登录
     *
     */
    @GET("login/wx/code")
    Observable<BaseResultBean<WXLoginBean>> sendLoginRequest(@QueryMap Map<String, Object> map);

    /**
     * 创建订单
     *
     */
    @GET("order/createOrderH5")
    Observable<BaseResultBean<String>> payRequest(@QueryMap Map<String, Object> map);

    /**
     * 获取用户信息
     *
     */
    @GET("user/getUserVo")
    Observable<BaseResultBean<WXLoginBean>> getUser();

    /**
     * 发送验证码
     *
     */
    @GET("valid/sendSms")
    Observable<BaseResultBean> sendCodeRequest(@QueryMap Map<String, Object> map);


    /**
     * 查询是否有人给用户留遗嘱
     *
     */
    @GET("valid/isAssignor")
    Observable<BaseResultBean<Boolean>> sendAssignor(@QueryMap Map<String, Object> map);

    /**
     * 注销
     *
     */
    @GET("user/logout")
    Observable<BaseResultBean> logout();


    /**
     * 获取开关
     *
     */
    @GET("company/AndroidglobalConfig.json")
    Observable<ConfigBean> config();


}
